%
% cc_nm_interp1_const.m
%
%  Form the 1D constat interpolation matrix for a cell centered grid 
%
% input -- Nf = number of cell centers on the fine grid
% output -- 
%
function Ip = cc_nm_interp1_const(Nf);
    
  % number of centers on the coarse grid
  %
  Nc = Nf/2;
  
  % allocate space for the matrix
  %
  Ip = spalloc(Nf,Nc,2*Nc);
  
  % copy value to cell above
  %
  for j=1:Nc
      ifine = 2*j;
      Irange = [ifine-1:ifine];  % the fine cells to be affected.
      Ip(Irange,j) = [1.0; 1.0];
  end
